<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            display: flex;
            width: 40%;
            height: 300px;
            background-color: pink;
            /* 1.默认的主轴是:x 轴，也就是row  Y轴就是侧轴*/
            /* flex-direction: row; */
            /* 2.行翻转 */
            /* flex-direction: row-reverse; */
            /* 3.按列排列 */
            /* flex-direction: column; */
            /* 4.按列排列，翻转 */
              flex-direction: column-reverse;
        }

        div span{
            width: 150px;
            height: 100px;
            background-color: purple;
            margin: 10px;
        }
    </style>
</head>

<body>
        <!-- flex-direction 设置主轴方向
          注意:主轴和侧轴会变化，看flex-direction设置谁为主轴，剩下就是侧轴，子元素跟随主轴进行排列 
        -->

    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
    </div>
</body>

</html>